'use strict';

module.exports = app => {

  const { router, controller } = app;
  const showRouter = controller.commonRouter;

  /*主页*/
  router.get('/', controller.home.index);
  router.get('/index.html', controller.home.index);

  /* 视频板块 */
  router.get('/video.html', controller.video.videoIndex);
  router.get('/:id/video_content.html', controller.video.video_content);
  router.get('/:id/video_play.html', controller.video.video_play);
  router.get('/:id/video_play_task.html', controller.video.video_play_task);

  /* 线上班板块 */
  router.get('/online.html', controller.online.onlineIndex);
  router.get('/:id/online_content.html', controller.online.online_content);

  /* 书籍 */
  router.get('/book.html', controller.buyBook.bookList);
  router.get('/:id/buyBook.html', controller.buyBook.bookDetail);
  router.get('/:id/sureBuyBook.html', showRouter.sureBuyBook);

  /* 资料下载板块 */
  router.get('/download.html', controller.bbs.downloadList);
  router.get('/:id/download_content.html', controller.bbs.downloadContent);

  /* 公告 */
  router.get('/noticeList.html', controller.bbs.noticeList);
  router.get('/:id/notice_content.html', controller.bbs.noticeContent);

  /*其他*/
  router.get('/downApp.html', showRouter.downApp);
  router.get('/sendGift.html', showRouter.sendGift);
  router.get('/buyVip.html', showRouter.buyVip);
  router.get('/contactUs.html', showRouter.contactUs);
  router.get('/recruitDaren.html', showRouter.recruitDaren);
  router.get('/pdfview.html', showRouter.pdfview);

  /*登陆*/
  router.get('/login.html', showRouter.loginBycode);
  router.get('/loginQQ.html', showRouter.loginQQ);
  router.get('/loginweixin.html', showRouter.loginweixin);
  router.get('/loginBycode.html', showRouter.loginBycode);
  router.get('/register.html', showRouter.register);
  router.get('/forgotPassword.html', showRouter.forgotPassword);
  router.get('/bindOldAccount.html', showRouter.bindOldAccount);

  /*个人中心*/
  router.get('/:id/userInfo.html', showRouter.userInfo);
  router.get('/userCenter.html', showRouter.userCenter);
  router.get('/userCart.html', showRouter.userCart);
  router.get('/userAddress.html', showRouter.userAddress);
  router.get('/userSubmitOrder.html', showRouter.userSubmitOrder);
  router.get('/userCharge.html', showRouter.userCharge);
  router.get('/userWithdraw.html', showRouter.userWithdraw);
  router.get('/bindOldAccountToweixin.html', showRouter.bindOldAccountToweixin);

  /* 问答板块 */
  router.get('/answer.html', controller.answer.answer);
  router.get('/:id/answer_content.html', controller.answer.answer_content);
  router.get('/answer_daren.html', controller.answer.answer_daren);
  router.get('/answer_darenList.html', controller.answer.answer_darenList);

  /* 项目接单板块 */
  router.get('/project.html', controller.project.project);
  router.get('/project_rule.html', controller.project.project_rule);
  router.get('/project_rule_common.html', controller.project.project_rule_common);
  router.get('/:id/project_content.html', controller.project.project_content);
  router.get('/:id/project_content_user.html', controller.project.project_content_user);

  /* 软件源码 */
  router.get('/source.html', controller.source.source);
  router.get('/:id/source_content.html', controller.source.source_content);

  /* 博客 */
  router.get('/blog.html', controller.blog.blog);
  router.get('/:id/blog_content.html', controller.blog.blog_content);

  /*

    /!* 悬赏板块 *!/
    router.get('/reward.html', controller.home.reward);
    /!* 招聘板块 *!/
    router.get('/recruit.html', controller.home.recruit);
    router.get('/news.html', controller.news.list);

  */

};
